package util

import "fmt"

func MaxDiff(arr []int64) int64{
	fmt.Println(arr)
	min := arr[0]
	max := arr[0]
	for k,_ := range arr{
		if k == 0{
			continue
		}else{
			if arr[k] < min{
				min = arr[k]
			}else if arr[k]>max{
				max = arr[k]
			}
		}
	}
	return max-min
}